package com.nj.user.convert;

import com.nj.user.entity.po.SysUser;
import com.nj.user.entity.req.SysUserReq;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper //效率最高的类复制转换,代替 beanUtils
public interface SysUserConverter {
    SysUserConverter INSTANCE = Mappers.getMapper(SysUserConverter.class);
//    @Mapping(source = "age",target = "age1")如果两个变量名不一样的话可以设置
    SysUser convertReqToSysUser(SysUserReq sysUserReq);
}
